import { _decorator, Component, Node, ResolutionPolicy , Size, view ,screen} from 'cc';
const { ccclass, property } = _decorator;


/** 
 * 画布的标准化尺寸，就是之前说的
 * iPad 设备中的画布尺寸 = 1001 x 1334 (其中 1001 ≈ 1668/1.6672)
 * iPhone16设备中的画布尺寸 = 750 x1626（其中 1626 = 2556/1.572）
 */

export const G_VIEW_SIZE = new Size(0,0)
@ccclass('Boost')
export class Boost extends Component {
    start() {

        this.adapterScreen();

    }

    adapterScreen(){

        let resolutionPolicy: ResolutionPolicy = view.getResolutionPolicy();

        let designSize = view.getDesignResolutionSize();
        let frameSize = screen.windowSize;

        let frameW = frameSize.width;
        let frameH = frameSize.height;

        // 是否屏幕更宽
        const isScreenWidthLarger = (frameW / frameW) > (designSize.width / designSize.height);
        let targetResolutionPolicy = isScreenWidthLarger ? ResolutionPolicy.FIXED_HEIGHT : ResolutionPolicy.FIXED_WIDTH

        if (targetResolutionPolicy != resolutionPolicy.)



    }
}


